home *** CD-ROM | disk | FTP | other *** search
/ Otherware / Otherware_1_SB_Development.iso / mac / util / diskfile / ofiles11.sit / OpenFileSpy 1.1 Help / card_7436.txt < prev    next >
Encoding:
Text File  |  1990-12-04  |  1.8 KB  |  66 lines

  1. -- card: 7436 from stack: in.1 Help
  2. -- bmap block id: 7990
  3. -- flags: 0000
  4. -- background id: 2665
  5. -- name: Mac and Open Files
  6. ----- HyperTalk script -----
  7. on openCard
  8.   set visible of background button "Forward But" to true
  9.   set visible of background button "Backward But" to false
  10. end openCard
  11.  
  12.  
  13.  
  14. -- part 1 (button)
  15. -- low flags: 00
  16. -- high flags: 0000
  17. -- rect: left=22 top=157 right=171 bottom=178
  18. -- title width / last selected line: 0
  19. -- icon id / first selected line: 0 / 0
  20. -- text alignment: 1
  21. -- font id: 0
  22. -- text size: 12
  23. -- style flags: 0
  24. -- line height: 16
  25. -- part name: New Button
  26. ----- HyperTalk script -----
  27. on mouseUp
  28.   push card
  29.   visual effect zoom out
  30.   go to card "FCB"
  31. end mouseUp
  32.  
  33.  
  34.  
  35. -- part 2 (button)
  36. -- low flags: 00
  37. -- high flags: 0000
  38. -- rect: left=277 top=157 right=170 bottom=369
  39. -- title width / last selected line: 0
  40. -- icon id / first selected line: 0 / 0
  41. -- text alignment: 1
  42. -- font id: 0
  43. -- text size: 12
  44. -- style flags: 0
  45. -- line height: 16
  46. -- part name: New Button
  47. ----- HyperTalk script -----
  48. on mouseUp
  49.   push card
  50.   visual effect zoom out
  51.   go to card "Detail Window"
  52. end mouseUp
  53.  
  54.  
  55.  
  56. -- part contents for background part 1
  57. ----- text -----
  58. The Mac -- and Open Files
  59.  
  60. -- part contents for background part 2
  61. ----- text -----
  62. A file system is a very complex thing -- Inside Mac, vol IV devotes 120 pages to its use.  One of the things the files system does is keep track of which files are currently open.
  63.  
  64. For each file, the Mac OS keeps a File Control Block (FCB) in memory.  This beast contains lots of useful stuff (all displayed in a "detail window" by OpenFileSpy).  This block is kept around until the file is closed.
  65.  
  66. When the Mac boots, memory for only a certian number of these FCBs is set aside --thus a limit on the number of open files at any one time.  As a file is opened a block is filled.  When closed, the block is freed up for later use.